1. Field of the Invention
The present invention relates to a two-dimensional code reader, a two-dimensional code reading method, a two-dimensional code reading program and a computer readable recording medium.
2. Description of the Related Art
At present, various symbols such as a bar code and a two-dimensional code are utilized in the field such as merchandise management. The bar code is also referred to as a one-dimensional code, a linear code or the like, and segments having various widths are linearly arranged adjacent to each other so that information such as alphanumerics can be represented by a bar portion and a blank portion, and a universal product code is represented, for example. On the other hand, the two-dimensional code is also referred to as a two-dimensional symbol, a three-dimensional bar code or the like and is a symbol in which information is arranged vertically and horizontally, and has a feature that a computerization density is high, more information can be stored than that in a bar code and errors can be corrected because of a redundant code. In recent years, therefore, the two-dimensional code has rapidly spread in various fields.
In order to read the bar code and the two-dimensional code, a bar code scanner or a two-dimensional code reader is utilized for an optical type information reader. FIG. 1 is a block diagram showing an example of the structure of a two-dimensional code reader. In the two-dimensional code reader shown in FIG. 1, an image pick-up section 2 for acquiring an image including a two-dimensional code 15 and an illuminating section 3 for providing an illumination when acquiring an image by the image pick-up section 2 are connected to a two-dimensional code reader body to be a decoding section 1. The illuminating section 3 uniformly illuminates a two-dimensional code. The image pick-up section 2 includes image pick-up optical systems, for example, a camera 4 and a lens 5. In the image pick-up section 2, the camera 4 includes an image sensor such as a CCD image element, and image data in a region including a two-dimensional code label are picked up by an image sensing technique using a CCD and the image of the two-dimensional code is projected onto a CCD area sensor and is converted into an electric signal. The signal thus converted is expanded onto a memory in the image pick-up section 2 and is fetched as an image. The two-dimensional code is cut out by an image processing from image data fetched as an image, and is changed into a binary and is thus decoded so that encoded information is read.
Thus, the two-dimensional code is read differently from the bar code and the two-dimensional code is cut and decoded by the image processing. For this reason, an image pick-up optical system such as an image sensor, a camera and a lens for reading an image is required. As compared with a bar code reader which does not require equipment such as a camera or an illuminator and can be handled comparatively easily, accordingly, there is a problem in that the two-dimensional code reader requires a work for setting two-dimensional code reading conditions such as image pick-up conditions. For a user who does not know much about the two-dimensional code, particularly, a work for setting the reading conditions takes a great deal of time and labor and is hard to carry out. Although the two-dimensional code can store information at a high density, the size of a cell to be a minimum unit constituting the two-dimensional code is reduced in some cases. In order to accurately read the two-dimensional code with high precision, it is necessary to reliably capture the two-dimensional code by an image pick-up optical system. More specifically, it is necessary to hold the whole two-dimensional code in the visual field of a finder of a camera and to accurately adjust the focus such that a photograph can be taken as largely as possible in the vicinity of a center and the details can be read. For this purpose, it is necessary to regulate various parameters such as the attachment distance of a camera, the thickness of a close-up lens and the scale of a focusing ring and to set the optimum conditions.
However, the conventional two-dimensional code reader has a drawback that such a setting work is very complicated. In particular, a beginning user cannot understand the meaning of each set item and cannot smoothly carry out a work for moving a focusing regulation direction and a visual field and for shifting a focal position, thereby creating difficulties. Actually, it is necessary to manually carry out confirmation and setting after much trial and error at a site where the two-dimensional code reader is used. Therefore, a great deal of time and labor are required. For example, if the optimum combination of the close-up lenses is to be decided, for example, it is necessary to variously change the number of the close-up rings and the combination thereof and to carry out attachment again. In order to exchange the close-up ring, it is necessary to loosen a screw type ring, to remove a lens from an image pick-up section at each time, to exchange the close-up ring and to attach a new close-up ring again. Such an exchange work requires a great deal of time and labor.
Conventionally, a correspondence table indicating the combination of the correspondence relationship for each parameter has been used to facilitate such a setting. In general, the correspondence table describing, in a matrix, the correspondence relationship between the items, for example, the thickness of a close-up lens to be used for an image pick-up optical system, the attachment distance of a camera, a focusing range, the size of a visual field, the thickness of the close-up ring and the standard of the scale of a focusing ring is printed or belongs to the setting manual of the two-dimensional code reader. A user needs to determine the optimum condition setting such that an optimum two-dimensional code can be read according to the kind of the two-dimensional code to be used by himself (herself), the printing state of the two-dimensional code, an environment and other conditions while comparing the correspondence tables. Also in this method, however, the user actually selects a necessary correspondence table while looking up the manual, and furthermore, manually carries out a work for searching for a desirable combination, which is complicated. Moreover, the correspondence table is to be prepared by hand and can be misplaced. Furthermore, the setting work is complicated for the user who does not know much about the two-dimensional code, and the setting itself cannot be carried out easily. For this reason, the complication cannot be eliminated.